package com.mer.controller;

import com.mer.entity.Order;
import com.mer.service.OrderService;
import com.mer.vo.CommonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @program: IIPhase-project
 * @description:
 * @author: 张庆恒
 * @create: 2021-10-22 11:37
 **/
@RestController
@RequestMapping("/order/order")
@Api(tags = "后台订单")
public class OrderController {
    @Resource
    private OrderService orderService;
    @PostMapping("/getAllOrder/{page}/{limit}")
    @ApiOperation("分页查询全部教师")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "page", value = "当前页数"),
            @ApiImplicitParam(name = "limit", value = "每页条数")
    })
    public CommonResult getAllOrder(@PathVariable("page") Integer page, @PathVariable("limit") Integer limit, @RequestBody Order order) {
        return orderService.getAllOrder(page, limit, order);
    }
}
